how to deploy nginx-ingress on kubernetes1.19

  1. deploy:

    git clone https://github.com/nginxinc/kubernetes-ingress/
    cd kubernetes-ingress/deployments
    git checkout v1.8.1
    kubectl apply -f common/ns-and-sa.yaml
    kubectl apply -f rbac/rbac.yaml
    kubectl apply -f common/default-server-secret.yaml
    kubectl apply -f common/nginx-config.yaml
    kubectl apply -f daemon-set/nginx-ingress.yaml
    cat ingress.yaml
    apiVersion: extensions/v1beta1
    kind: Ingress
    metadata:
      name: chenshi
      annotations:
        nginx.org/proxy-connect-timeout: "30s"
        nginx.org/proxy-read-timeout: "30s"
        nginx.org/client-max-body-size: "10m"
        #nginx.org/rewrites: "serviceName=chenshi rewrite=/;serviceName=other rewrite=/"
    spec:
      rules:
      - host: chenshi.de
        http:
          paths:
          - path: /chenshi
            backend:
              serviceName: chenshi
              servicePort: 80
          - path: /other
            backend:
              serviceName: other
              servicePort: 8080
    
  2. references:

    https://docs.nginx.com/nginx-ingress-controller/installation/installation-with-manifests

    https://github.com/nginxinc/kubernetes-ingress/tree/v1.8.1/examples/rewrites